<div class="filter">
<?php echo $filter ?>
</div>
<div  class="box">
<table class="boxlist">
	<thead >
		<tr >
			<th >
				Name
			</th>
			<th style='width:40px;'>
				Chinese
			</th>
			<th style='width:40px;'>
				English
			</th>
			<th style='width:40px;'>
				Malay
			</th>
			<th >
				Created
			</th>
			<th >
				Action
			</th>
		</tr>
	</thead>
<?php foreach ($result as $row): ?>
	<tr >
		<td >
			<?php echo $row['name'] ?>
		</td>
		<td >
			<?php echo Yii::app()->params['flag']['yesNo'][$row['cn']] ?>
		</td>
		<td >
			<?php echo Yii::app()->params['flag']['yesNo'][$row['en']] ?>
		</td>
		<td >
			<?php echo Yii::app()->params['flag']['yesNo'][$row['my']] ?>
		</td>
		<td >
			by <?php echo Fish::xr(Fish::getRow('user',$row['user_create']),'name') ?>
			at <?php echo date('Y M d',strtotime($row['date_create'])); ?>
		</td>
		<td >
			<?php
				$label = '<button class="bt3">Edit</button>';
				$rurl= array('admin/updateArtist','id'=>$row['id']);
				$htmlOption = array('style'=>'float:left;');
				echo CHtml::link($label,$rurl,$htmlOption);
			?>
			<?php echo Chtml::beginForm(array('delete'),'post',array('style'=>'float:left;')) ?>
			<input type="hidden" name="Artist[id]" value="<?php echo $row['id'] ?>" />
			<?php
				$label = '<button class="bt3">Delete</button>';
				$rurl= array('admin/deleteArtist','id'=>$row['id']);
				$htmlOption = array('class'=>'confirm');
				echo CHtml::link($label,$rurl,$htmlOption);
			?>
			<?php echo Chtml::endForm(); ?>
		</td>
	</tr>
<?php endforeach ?>
</table>
<?php echo $pager ?>
</div>
